package com.kzj.fun.interfaces.impl;

import com.kzj.fun.container.root.RootPanel;

import java.awt.*;

public class PaintFillEllipseMenuFunction extends PaintGraphMenuFunction {

    public PaintFillEllipseMenuFunction(RootPanel rootPanel) {
        super(rootPanel);
    }
    @Override
    void paint(Graphics2D g2d) {
        int x=Math.min(startPoint.x,endPoint.x);
        int y=Math.min(startPoint.y,endPoint.y);
        int width=Math.abs(startPoint.x-endPoint.x);
        int height=Math.abs(startPoint.y-endPoint.y);
        g2d.fillOval(x,y,width,height);
    }
}
